import { rand } from './';

const aks = [
    // 智慧农业 lrx_cn@163.com
    "8adfb91083d58b6439fcd1246d08682f",
    // 天地图test lrx_cn@163.com
    "ab0b28fb4efdd2ff5e34634a011b9f31",
    // 智慧农业扩展_1 lrx_cn@163.com
    "da74b53ec3c358a190ba6c025e018bbc",
    // 智慧农业扩展_2 lrx_cn@163.com
    "b94355a3653179023f90e7fbf9c1602a",
    // 智慧农业扩展_3 lrx_cn@163.com
    "641954230b23cace70dfd1137a1ba956",
    // 智慧农业扩展_4 HIT_AI_SmartAgriculture_01@somemail.com
    "db56dcef7a488a43c08b9eb4c4eea1a4",
    // 智慧农业扩展_5 HIT_AI_SmartAgriculture_01@somemail.com
    "1777637842367b22417541402f462d67",
    // 智慧农业扩展_6 HIT_AI_SmartAgriculture_01@somemail.com
    "46006562477bdea294e1d37d76971bcd",
    // 智慧农业扩展_7 HIT_AI_SmartAgriculture_01@somemail.com
    "9e4a264bfdd1c55d98350814c27d9aad",
    // 智慧农业扩展_8 HIT_AI_SmartAgriculture_01@somemail.com
    "ac3c82d54037eb268e44edab1dd3fce2",
];
  
  const servers = [...Array(8).keys()];

  export const akProxy = new Proxy(aks, {
      get(target, prop){
          if (prop === 'ak') {
              return target[rand(0, target.length - 1)]
          }
          return target[prop]
      }
  })


  export const serversProxy = new Proxy(servers, {
      get(target, prop){
          if (prop === 'server') {
              return target[rand(1, target.length - 1)]
          }
          return target[prop]
      }
  })
